package routers

import (
	"game-sys/handlers"
	"github.com/gin-contrib/cors"
	"github.com/gin-gonic/gin"
)

func Init() *gin.Engine {

	r := gin.Default()
	r.Use(cors.Default())
	r.Static("static", "./static")
	r.POST("/user/login", handlers.UserLogin)

	r.GET("/devil/list", handlers.DevilList)

	return r
}
